import { service, serviceForMock, request, requestForMock, mock } from '@/api/_service.js'
//获取课程班列表
export function get_score(data){
    return request({
        url: 'stu/tea/showAllListOfCoursesByStatus',
        method: 'get',
        params: data
    })
}
export function push_score(data){
    return request({
        url: 'stu/common/releaseCourseSelectionInformation',
        method: 'post',
        data
    })
}
//获取选课信息
export function get_course_info(){
    return request({
        url: 'stu/common/getCourseStartStatus',
        method: 'get',
    })
}

//学生选课
export function stu_selection(data){
    return request({
        url: '/k/kill/studentElective',
        method: 'post',
        data
    })
}

//学生退课
export function stu_withdraw(data){
    return request({
        url: '/k/kill/studentWithdraws?randomCode='+data.randomCode,
        method: 'post',
        
    })
}


//获取学生已选课程
export function get_stu_course(){
    return request({
        url: 'stu/common/showAlreadyChooseCourse',
        method: 'get',
     
    })
}

//获取公告
export function get_notice(){
    return request({
        url: '/stu/noToken/showAnnouncement',
        method: 'get',
     
    })
}

//新增公告
export function add_notice(data){
    return request({
        url: '/stu/admin/addAnnouncement',
        method: 'post',
        data
    })
}

//删除缓存预热
export function del_cache(){
    return request({
        url: '/stu/common/deleteCacheAndTemp',
        method: 'DELETE',
       
    })
}

//获取轮播图
export function get_banner(){
    return request({
        url: '/stu/noToken/showRotationPlot',
        method: 'get',   
    })
}
//上传轮播图
export function upload_banner(data){
    return request({
        url: '/stu/admin/addRotationPlot',
        method: 'post',
        data
    })
}

//获取policy
export function get_policy(){
    return request({
        url: '/stu/oss/policy',
        method: 'get',
    })
}

//修改公告
export function put_notice(data){
    return request({
        url: '/stu/admin/editAnnouncement',
        method: 'POST',
        data
    })
}

//删除公告
export function del_banner (data){
    return request({
        url: '/stu/admin/deleteRotationsPlot?ids='+data,
        method: 'delete',
        
    })
}

//删除轮播图
export function del_notice(data){
    return request({
        url: '/stu/admin/deleteAnnouncement?ids='+data,
        method: 'delete',
        
    })
}
//添加测试用户
export function add_test_user(data){
    return request({
        url: `/api/auth/user/generateRandomUsers?date=${data.date}&size=${data.size}&lastNumber=${data.lastNumber}`,
        method: 'post',

    })
}

//获取随机用户列表
export function get_test_user(data){
    return request({
        url: '/api/auth/user/getRandomUsers',
        method: 'post',
        data
    })
}

